<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>

        div{
            width: 100px;
            height: 100px;
            background: red;
            /*
            box-sizing: content-box|border-box
            当盒子模型的 box-sizing: border-box
            设置border,padding 他的宽高不发生改变 */
            box-sizing: border-box;
            margin-left: 100px;
            border: 1px solid #333;
            padding: 5px;
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>